home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.20020314-20021006 / 000085_sonicechoesWit…pam@hotmail.com_Tue May 21 08:58:22 EDT 2002.msg < prev    next >
Text File  |  2020-01-01  |  3KB  |  108 lines

  1. Article: 13379 of comp.protocols.kermit.misc
  2. Path: newsmaster.cc.columbia.edu!news.cs.columbia.edu!peerfeed.news.psi.net!unlisys!news.snafu.de!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news-out.nuthinbutnews.com!propagator-sterling!news-in.nuthinbutnews.com!feed.cgocable.net!news.sprintnetops.net!sjc-peer.news.verio.net!news.verio.net!sn-xit-01!sn-post-01!supernews.com!corp.supernews.com!not-for-mail
  3. From: dgk <sonicechoes@hot-nospamp-mail.com>
  4. Newsgroups: comp.protocols.kermit.misc
  5. Subject: Why does my script exit?
  6. Date: Tue, 21 May 2002 08:32:06 -0400
  7. Organization: Posted via Supernews, http://www.supernews.com
  8. Message-ID: <b3fkeukbsnm79kdi3f4crjs4ka9vinc6f2@4ax.com>
  9. Reply-To: sonicechoesWithNoSpam@hotmail.com
  10. X-Newsreader: Forte Agent 1.91/32.564
  11. MIME-Version: 1.0
  12. Content-Type: text/plain; charset=us-ascii
  13. Content-Transfer-Encoding: 7bit
  14. X-Complaints-To: newsabuse@supernews.com
  15. Lines: 90
  16. Xref: newsmaster.cc.columbia.edu comp.protocols.kermit.misc:13379
  17.  
  18. This loop, from hostmdm.ksc, exits and returns to the command prompt
  19. after running my MM1 script:
  20.  
  21. while 1 {
  22.     answer
  23.     if > \v(dialstatus) 0 if < \v(dialstatus) 22 stop 1 Fatal modem
  24. error
  25.     if = \v(dialstatus) 0 take MM1.ksc
  26.     echo Type Ctrl-C to exit...          ; Give user a chance to
  27. cancel
  28.     sleep 2
  29. }
  30.  
  31. This is the MM1 script. It isn't complete, but after executing the
  32. IFAIL code (hangup, exit), the above loop just exits and doesn't stick
  33. around for another call. Any help appreciated.
  34.  
  35. Just as an aside, I was going to use the INTEXT macro to read a line
  36. but that seems designed for terminal emulation and this is just being
  37. used by another computer with its script so I don't think that I need
  38. to worry about backspaces and cursor positions.
  39.  
  40. OUTPUT WELCOME TO THE MM1 SCRIPT\13\10\10
  41. DEF \%C 0
  42. :GETUSER
  43. CLEAR INPUT
  44. INC \%C 1
  45. IF = \%C 6 GOTO IFAIL
  46. OUTPUT \13\10Username:
  47. INPUT 10 \13
  48. DEF \%U
  49. DEF \%Z \V(INPUT)
  50. DEF \%I \v(incount)
  51. DECREMENT \%I 1
  52.  ;IF > \%I 1 DEF \%U \fsub(\%Z,1,\%I) 
  53. IF > \%I 1 ASG %U \fsubSTR(\%Z,1,\%I)
  54. ASG \%B \%U 
  55. IF EQUAL {\%U} MMUSER FORWARD INITPW
  56. IF EQUAL {\%U} JOHN FORWARD INITPW
  57. GOTO GETUSER
  58. :INITPW
  59. DEF \%C 0
  60. :GETPW
  61. CLEAR INPUT
  62. INC \%C 1
  63. IF = \%C 5 GOTO IFAIL
  64. OUTPUT \13\10Password:
  65. INPUT 10 \13
  66. DEF \%p
  67. DEF \%Z \V(INPUT)
  68. DEF \%I \v(incount)
  69. DECREMENT \%I 1
  70. IF > \%I 1 DEF \%p \fsubSTR(\%Z,1,\%I) 
  71. IF EQUAL {\%p} PAUL FORWARD CHECK
  72. IF EQUAL {\%p} MMPW FORWARD CHECK
  73. GOTO GETUSER
  74. :IFAIL
  75. HANGUP
  76. EXIT
  77. :CHECK
  78. IF EQUAL \%B JOHN IF EQUAL \%P PAUL FORWARD CHGDIR
  79. IF EQUAL \%B MMUSER IF EQUAL \%P MMPW FORWARD CHGDIR
  80. GOTO GETPW
  81. :CHGDIR ; Change directory here
  82. :GETCMDP    ;
  83. ASG \%T 0
  84. :GETCMD    ; What does the user want to do anyway?
  85. OUTPUT \13\10Command:\13\10
  86. CLEAR INPUT
  87. INPUT 10 \13
  88. DEF \%C
  89. DEF \%Z \V(INPUT)
  90. DEF \%I \v(incount)
  91. DECREMENT \%I 1
  92. IF > \%I 1 ASG %C \fsubSTR(\%Z,1,\%I)
  93. IF EQUAL {\%C} SND OUTPUT \13\10OK, GOTO RECEIVE
  94. IF EQUAL {\%C} {RCV R} OUTPUT \13\10OK, GOTO SEND
  95. IF EQUAL {\%C} BYE HANGUP,QUIT
  96. INC \%T 1
  97. IF = \%T 4 GOTO IFAIL
  98. GOTO GETCMD
  99. :RECEIVE
  100. RECEIVE
  101. GOTO GETCMDP
  102. :SEND
  103. OUTPUT WE ARE SENDING A FILE
  104. OUTPUT RTS ; IF THERE IS ANYTHING TO SEND
  105. OUTPUT NTS    ; IF THERE IS NOTHING TO SEND
  106.     ; After send we need to wait for another {RCV R} ?
  107. GOTO GETCMDP
  108.